html prevent submit from reloading page

107

jquery submit refresh page stop -

$("#prospects_form").submit(function(e) {
    e.preventDefault(); // <==stop page refresh==>
});

prevent re submit form on refresh javascript -

<script>
    if ( window.history.replaceState ) {
        window.history.replaceState( null, null, window.location.href );
    }
</script>

Comments

Submit
0 Comments